import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

/* 导入样式 */
import '@/styles/base.scss';
import '@/styles/reset.css';
import '@/styles/iconfont.css';

/* 导入 element-ui */
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

/* 导入vue-router */
import VueRouter from 'vue-router';
Vue.use(VueRouter);

/* 导入对应路由 */
import discovery from '@/views/discovery';
import recommend from '@/views/recommend';
import latestmusic from '@/views/latestmusic';
import lastestmv from '@/views/lastestmv';
import result from '@/views/result';
import songlists from '@/views/songlists';
import mvdetails from '@/views/mvdetails';



/* 配置路由 */
const router = new VueRouter({
    routes: [{
            // 发现音乐
            path: '/',
            redirect: '/discovery'
        },
        {
            // 发现音乐
            path: '/discovery',
            component: discovery
        },
        {
            // 推荐歌单
            path: '/recommend',
            component: recommend
        },
        {
            // 最新音乐
            path: '/latestmusic',
            component: latestmusic
        },
        {
            // 最新mv
            path: '/lastestmv',
            component: lastestmv
        },
        {
            // 搜索结果
            path: '/result',
            component: result
        },
        {
            // 歌单详情页
            path: '/songlists',
            component: songlists
        },
        {
            // 歌单详情页
            path: '/mvdetails',
            component: mvdetails
        }
    ]
});

new Vue({
    render: h => h(App),
    router,
}).$mount('#app')